Stefan Kangas [Sun, 28 Feb 2021 00:51:31 +0000 (01:51 +0100)]
Convert text-mode menu to easymenu
* lisp/textmodes/text-mode.el (text-mode-map): Move menu
definition from here...
(text-mode-menu): ...to here, and convert to easymenu.
Stefan Kangas [Sat, 27 Feb 2021 23:13:24 +0000 (00:13 +0100)]
; Make function missed in previous change obsolete
* lisp/play/handwrite.el (menu-bar-handwrite-map): Make unused
function obsolete.
Stefan Kangas [Sat, 27 Feb 2021 22:34:33 +0000 (23:34 +0100)]
Convert isearch menu to easymenu
* lisp/isearch.el (isearch-menu-bar-yank-map)
(isearch-menu-bar-map, isearch-mode-map): Move menu definition
from here...
(isearch-menu-bar-map): ...to here, and convert to easymenu.
* lisp/loadup.el ("emacs-lisp/easymenu"): Move before isearch.el.
Stefan Kangas [Sat, 27 Feb 2021 22:26:59 +0000 (23:26 +0100)]
Checkdoc fixes in isearch.el
* lisp/isearch.el (isearch--set-state, isearch-yank-pop-only)
(isearch-search-and-update, isearch-complete-edit, isearch-search):
Minor doc fixes.
Juri Linkov [Sat, 27 Feb 2021 20:09:33 +0000 (22:09 +0200)]
* lisp/tab-bar.el: Support displaying global-mode-string in the tab bar.
* lisp/tab-bar.el (tab-bar--define-keys): Update global-mode-string
in mode-line-misc-info with condition to disable global-mode-string
in the mode line.
(tab-bar-format): New variable.
(tab-bar-format-history, tab-bar-format-add-tab)
(tab-bar-format-tabs): New functions with body from
'tab-bar-make-keymap-1'.
(tab-bar-format-align-right, tab-bar-format-global): New functions for
'tab-bar-format' list.
(tab-bar-format-list): New utility function.
(tab-bar-make-keymap-1): Just call 'tab-bar-format-list'.
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01210.html
Juri Linkov [Sat, 27 Feb 2021 20:00:51 +0000 (22:00 +0200)]
* lisp/subr.el (read-char-choice-with-read-key): New function.
* lisp/subr.el (read-char-choice): Move most of the function body to
'read-char-choice-with-read-key'.
(read-char-choice-with-read-key): New function with body from
'read-char-choice'.
Stefan Kangas [Sat, 27 Feb 2021 19:22:43 +0000 (20:22 +0100)]
; Fix mistake in easymenu conversion
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Use :style and
:selected instead of :button.
Stefan Kangas [Sat, 27 Feb 2021 19:17:03 +0000 (20:17 +0100)]
Convert Buffer-menu-mode menu to easymenu
* lisp/buff-menu.el (Buffer-menu-mode-map): Move menu
definition from here...
(Buffer-menu-mode-menu): ...to here, and convert to easymenu.
Stefan Kangas [Sat, 27 Feb 2021 17:43:20 +0000 (18:43 +0100)]
Minor fixes after preloading easymenu
* lisp/cedet/ede/dired.el:
* lisp/dired-x.el:
* lisp/filesets.el:
* lisp/follow.el:
* lisp/gnus/gnus-registry.el:
* lisp/net/eudc.el:
* lisp/printing.el:
* lisp/recentf.el:
* lisp/speedbar.el: Remove redundant require of easymenu; it is now
preloaded.
* lisp/org/org.el:
* lisp/progmodes/antlr-mode.el:
* lisp/progmodes/vhdl-mode.el:
* lisp/textmodes/reftex.el: Don't require easymenu in Emacs 28 or
later.
* etc/NEWS: Announce that 'easymenu' is now preloaded.
Glenn Morris [Sat, 27 Feb 2021 18:02:24 +0000 (10:02 -0800)]
Fix doc/misc Makefile for out-of-tree with relative path
* doc/misc/Makefile.in (org_template): Fix for relative srcdir.
Glenn Morris [Sat, 27 Feb 2021 17:31:29 +0000 (09:31 -0800)]
Improve Makefile treatment of org sources in doc/misc
* doc/misc/Makefile.in (ORG_SETUP): New variable.
(ORG_SRC): Use wildcard rather than hard-coding.
(org_template): Adjust for input containing $srcdir and suffix.
(org_setup_template): New template.
Stefan Monnier [Sat, 27 Feb 2021 17:28:17 +0000 (12:28 -0500)]
* lisp/emacs-lisp/bytecomp.el: Fix minor regression introduced by pdump
After `rm **/*.elc; make` we'd sometimes get loads and loads of unnecessary
"Reloading ...".
(byte-compile-refresh-preloaded): Don't reload files that are more
recent than `temacs` but older than the `.pdmp` file.
Stefan Kangas [Sat, 27 Feb 2021 17:22:59 +0000 (18:22 +0100)]
Don't require overlay; that's only needed in XEmacs
* lisp/allout.el:
* lisp/net/eudc.el:
* lisp/org/org.el: Don't require overlay; that's only needed in
XEmacs.
Stefan Monnier [Sat, 27 Feb 2021 17:21:02 +0000 (12:21 -0500)]
* lisp/emacs-lisp/cconv.el: Fix uncaught brain farts in last change
(cconv--convert-funcbody, cconv-convert): Use `macroexp--warn-wrap` properly.
Lars Ingebrigtsen [Sat, 27 Feb 2021 14:58:19 +0000 (15:58 +0100)]
Add sexp navigation commands to elisp-mode
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add some
navigation commands (bug#24774).
Stefan Kangas [Sat, 27 Feb 2021 14:15:29 +0000 (15:15 +0100)]
Convert emacs-lisp-mode menu to easy-menu-define
* lisp/loadup.el: Preload easymenu.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-map): Convert menu to
use easy-menu-define (bug#24774).
Matt Armstrong [Tue, 23 Feb 2021 00:40:05 +0000 (16:40 -0800)]
Remove unecessary unlock-buffer calls
* lisp/files.el (revert-buffer-insert-file-contents--default-function):
Remove vestigial call to `unlock-buffer'.
* lisp/simple.el (primitive-undo): Assume unlock-buffer is always
bound. (Bug#46701)
Lars Ingebrigtsen [Sat, 27 Feb 2021 05:02:17 +0000 (06:02 +0100)]
Compute grep defaults earlier
* lisp/progmodes/grep.el (grep): Always compute the defaults
(bug#46801).
(grep-highlight-matches): Clarify that it's not just used
interactively.
Lars Ingebrigtsen [Sat, 27 Feb 2021 04:43:06 +0000 (05:43 +0100)]
Change defcustom types of two non-standard hooks
* lisp/erc/erc.el (erc-before-connect, erc-after-connect): Change
type from 'hook to 'function (bug#34657).
F. Jason Park [Sat, 27 Feb 2021 04:35:40 +0000 (05:35 +0100)]
Accept string argument in erc-add-to-input-ring
* lisp/erc/erc-ring.el: (erc-add-to-input-ring)
(erc-previous-command): Use existing API to grab input.
* test/lisp/erc/erc-tests.el: (erc-ring-previous-command)
See (bug#46339).
Lars Ingebrigtsen [Sat, 27 Feb 2021 04:23:45 +0000 (05:23 +0100)]
Add generated .texi files to .gitignore
Glenn Morris [Sat, 27 Feb 2021 03:32:38 +0000 (19:32 -0800)]
Fixes for doc/misc org source files
* doc/misc/org-setup.org: Fix "version" file lookup. Add copyright.
* doc/misc/modus-themes.org: Fix up doclicense include.
* doc/misc/org.org: Remove non-working and unused "modification-time".
Fix up doclicense include. Adjust setupfile inclusion.
Glenn Morris [Sat, 27 Feb 2021 03:28:43 +0000 (19:28 -0800)]
Distribute the real source for some doc/misc manuals (bug#45143)
* doc/misc/modus-themes.texi, doc/misc/org.texi:
Remove generated files from repository.
* doc/misc/Makefile.in: Add rules for building .texi from .org.
(ORG_SRC, abs_top_builddir, EMACS, emacs):
New variables.
(org_template): New template.
(orgclean): New phony target.
* Makefile.in (info): Depend on lisp.
* lisp/org/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
New function.
* doc/misc/org.org, doc/misc/org-setup.org: New files.
Import from https://code.orgmode.org
d8e8a97a14.
Protesilaos Stavrou [Sat, 27 Feb 2021 03:27:57 +0000 (19:27 -0800)]
Import org source file for modus-themes manual
* doc/misc/modus-themes.org: New file.
Import from https://gitlab.com/protesilaos/modus-themes
515180ac.
Stefan Kangas [Sat, 27 Feb 2021 02:23:39 +0000 (03:23 +0100)]
Use lexical-binding in progmodes/icon.el
* lisp/progmodes/icon.el: Use lexical-binding.
(electric-icon-brace): Very minor cleanup.
Stefan Kangas [Sat, 27 Feb 2021 02:14:04 +0000 (03:14 +0100)]
Convert change-log-mode menu to easy-menu-define
* lisp/vc/add-log.el (change-log-mode-map): Move menu from here...
(change-log-mode-menu): ...to here; convert to easy-menu-define.
Stefan Monnier [Sat, 27 Feb 2021 01:24:52 +0000 (20:24 -0500)]
* lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warnings
Instead of warning about unused vars during the analysis phase of
closure conversion, do it in the actual closure conversion by
annotating the code with "unused" warnings, so that the warnings
get emitted later by the bytecomp phase, like all other warnings,
at which point the line-number info is a bit less imprecise.
Take advantage of this change to wrap the expressions of unused
let-bound vars inside (ignore ...) so the byte-compiler can better
optimize them away.
Finally, promote `macroexp--warn-and-return` to "official" status
by removing its "--" marker.
(cconv-captured+mutated, cconv-lambda-candidates): Remove vars.
(cconv-var-classification): New var to replace them.
(cconv-warnings-only): Delete function.
(cconv--warn-unused-msg, cconv--var-classification): New functions.
(cconv--convert-funcbody): Add warnings for unused args.
(cconv-convert): Add warnings for unused vars in `let` and `condition-case`.
(cconv--analyze-use): Don't emit an "unused var" warning any more,
but instead remember the fact in `cconv-var-classification`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings):
Remove variable.
(byte-compile-preprocess): Remove corresponding case.
* lisp/emacs-lisp/pcase.el (pcase--if): Don't throw away `test` effects.
(\`):
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Use `car-safe` instead
of `car`, so it can more easily be removed by the optimizer if the
result is not used.
* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): New function.
(macroexp-warn-and-return): Rename from `macroexp--warn-and-return`.
Stefan Monnier [Fri, 26 Feb 2021 21:51:15 +0000 (16:51 -0500)]
lisp/vc/*.el: Use lexical-bindings in all the files
Also remove some redundant `:group` arguments.
* lisp/vc/vc.el (vc-ignore): Autoload.
* lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions.
* lisp/vc/cvs-status.el: Require `cl-lib` at runtime.
(cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead.
* lisp/vc/pcvs.el: Require `cl-lib` at runtime.
(cvs-do-removal): Use `cl-every` instead.
* lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess`
and `ediff-default-suspend-function`).
* lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea`
and `subtypeb`.
* lisp/vc/vc-git.el:
* lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for
`vc-do-async-command`.
Stefan Monnier [Fri, 26 Feb 2021 20:34:30 +0000 (15:34 -0500)]
* lisp/cedet/semantic/idle.el: Fix compilation warning
(eldoc-last-message): Remove var declaration.
(eldoc-message): Remove function declaration.
(semantic--eldoc-info): Rename from semantic-idle-summary-idle-function.
Make it usable on `eldoc-documentation-functions`.
(semantic-idle-summary-mode): Use `eldoc-mode`.
(semantic-idle-summary-refresh-echo-area): Delete function.
Stefan Monnier [Fri, 26 Feb 2021 20:19:31 +0000 (15:19 -0500)]
* lisp/cedet/semantic/analyze*.el: Use lexical-binding
* lisp/cedet/semantic/analyze.el: Use lexical-binding.
Rename the dynbound var `prefixtypes` to `semantic--prefixtypes`.
(semantic--prefixtypes): Declare var.
* lisp/cedet/semantic/analyze/complete.el: Use lexical-binding.
(semantic--prefixtypes): Declare var.
(semantic-analyze-possible-completions-default): Remove unused var `any`.
Rename `prefixtypes` to `semantic--prefixtypes`.
* lisp/cedet/semantic/analyze/debug.el: Use lexical-binding.
(semantic-analyzer-debug-global-symbol): Remove no-op use of `prefixtypes`.
* lisp/cedet/semantic/analyze/refs.el:
* lisp/cedet/semantic/analyze/fcn.el: Use lexical-binding.
Michael Albinus [Fri, 26 Feb 2021 17:37:14 +0000 (18:37 +0100)]
Fix Tramp manual
* doc/misc/tramp.texi (External methods): Mention "about-args".
(Remote shell setup): Use sshx.
Stefan Kangas [Fri, 26 Feb 2021 16:09:57 +0000 (17:09 +0100)]
; * test/lisp/progmodes/f90-tests.el: Remove stale comment.
Stefan Kangas [Fri, 26 Feb 2021 16:05:18 +0000 (17:05 +0100)]
* lisp/progmodes/dcl-mode.el: Minor doc fixes.
Stefan Kangas [Fri, 26 Feb 2021 15:23:45 +0000 (16:23 +0100)]
Convert some more progmode menus to easy-menu-define
* lisp/progmodes/dcl-mode.el (dcl-mode-map):
* lisp/progmodes/icon.el (icon-mode-map):
* lisp/progmodes/scheme.el (scheme-mode-map):
Move menu definitions from here...
* lisp/progmodes/dcl-mode.el (dcl-mode-menu):
* lisp/progmodes/icon.el (icon-mode-menu)
* lisp/progmodes/scheme.el (scheme-mode-menu):
...to here, and use easy-menu-define.
* lisp/progmodes/icon.el
(icon-mode-map, icon-mode-syntax-table): Simplify.
Stefan Kangas [Fri, 26 Feb 2021 15:09:14 +0000 (16:09 +0100)]
Convert simula-mode menu to easy-menu-define
* lisp/progmodes/simula.el (simula-mode-map): Move menu definition
from here...
(simula-mode-menu): ...to here, and use easy-menu-define.
(simula-popup-menu): Declare unused function obsolete.
Stefan Kangas [Fri, 26 Feb 2021 14:59:56 +0000 (15:59 +0100)]
Fix syntax highlighting of easy-menu-define docstrings
* lisp/emacs-lisp/easymenu.el (easy-menu-define): Add doc-string
declaration for correct syntax highlighting.
Stefan Kangas [Fri, 26 Feb 2021 14:50:41 +0000 (15:50 +0100)]
Remove redundant requires of easymenu
* lisp/allout.el:
* lisp/emacs-lisp/edebug.el:
* lisp/emacs-lisp/ert.el:
* lisp/erc/erc-menu.el:
* lisp/help-mode.el:
* lisp/net/dictionary.el:
* lisp/nxml/rng-nxml.el:
* lisp/progmodes/ebrowse.el:
* lisp/progmodes/meta-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ps-mode.el:
* lisp/progmodes/vera-mode.el:
* lisp/wid-browse.el: Remove redundant require of easymenu. We only
use the autoloaded macro 'easy-menu-define' here.
Stefan Kangas [Fri, 26 Feb 2021 04:43:53 +0000 (05:43 +0100)]
Remove check for missing easymenu from cperl-mode.el
* lisp/progmodes/cperl-mode.el (cperl-menu): Don't wrap definition
in condition-case; easymenu always exists in Emacs.
(easymenu): Remove redundant require.
Basil L. Contovounesios [Sat, 20 Feb 2021 18:55:12 +0000 (18:55 +0000)]
Function-quote completion property of declare form
For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-02/msg01666.html
* lisp/emacs-lisp/byte-run.el (byte-run--set-completion): Quote with
'function' for syntactical consistency with other declare form
properties. This allows writing (declare (completion foo)) instead
of (declare (completion 'foo)).
* lisp/emacs-lisp/easymenu.el (easy-menu-do-define):
* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Prefer
function-put over put for function symbols.
* lisp/subr.el (ignore, undefined): Remove #'-quoting from declare
form; it is no longer needed.
Mattias Engdegård [Fri, 26 Feb 2021 08:52:16 +0000 (09:52 +0100)]
Fix pcase rx pattern bugs
Two unrelated bugs: A missing type check caused an error in rx
patterns for non-string match targets, and rx patterns did not work at
all in pcase-let or pcase-let*.
Second bug reported by Basil Contovounesios and Ag Ibragimov; fixes
proposed by Stefan Monnier. Discussion and explanation in thread at
https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg01924.html
* lisp/emacs-lisp/rx.el (rx): Add (pred stringp) to avoid type errors,
and replace the `pred` clause for the actual match with something that
works with pcase-let(*) without being optimised away.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test cases.
Eli Zaretskii [Thu, 25 Feb 2021 18:58:44 +0000 (20:58 +0200)]
Fix documentation of a recent change
* src/fns.c (Fyes_or_no_p): Don't use braces around one-line
block.
(syms_of_fns) <use-short-answers>: Improve the wording of the doc
string.
* etc/NEWS: Improve wording of the entry about 'use-short-answers'.
Juri Linkov [Thu, 25 Feb 2021 18:45:40 +0000 (20:45 +0200)]
New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'
* lisp/cus-start.el: Add use-short-answers.
* lisp/emacs-lisp/map-ynp.el (read-answer): Handle use-short-answers.
(read-answer-short): Add use-short-answers to docstring.
* src/fns.c (Fyes_or_no_p): Call y-or-n-p if use_short_answers is true.
(syms_of_fns): Add DEFVAR_BOOL use-short-answers (bug#46594).
Alan Third [Wed, 24 Feb 2021 09:52:42 +0000 (09:52 +0000)]
Fix freeze on older macOS's (bug#46687)
* src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]):
([EmacsView viewWillDraw]): Only run this code when actually drawing
to an offscreen bitmap.
Robert Pluim [Thu, 25 Feb 2021 15:39:34 +0000 (16:39 +0100)]
Re-enable network-stream-tests.el :nowait t tests
After the fix for Bug#46709, these no longer fail in the absence of a
working Internet connection
* test/lisp/net/network-stream-tests.el (internet-is-working): Remove
defvar, it's no longer needed in this file.
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv4-nowait):
(connect-to-tls-ipv6-nowait):
(open-network-stream-tls-nowait):
(open-gnutls-stream-new-api-nowait):
(open-gnutls-stream-old-api-nowait): Remove check for internet-is-working.
Robert Pluim [Thu, 25 Feb 2021 15:36:56 +0000 (16:36 +0100)]
Don't crash if gnutls_handshake fails
In some situations involving Internet access not being fully
functional, gnutls_handshake returns a fatal error, which we were
ignoring, causing us to call gnutls_handshake again. Now we check for
the error and return it to the caller.
* src/gnutls.c (gnutls_try_handshake): Return immediately if
gnutls_handshake returns a fatal error (Bug#46709).
Robert Pluim [Thu, 25 Feb 2021 15:33:47 +0000 (16:33 +0100)]
* Specify 'ipv4 when testing ipv4 in network-stream-tests.el
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv4-nowait): Specify :family 'ipv4.
Robert Pluim [Tue, 23 Feb 2021 14:21:26 +0000 (15:21 +0100)]
; * src/xfaces.c (realize_gui_face): Correct formatting
* src/xfaces.c (realize_gui_face): Correct code formatting.
Stefan Kangas [Thu, 25 Feb 2021 11:54:58 +0000 (12:54 +0100)]
Convert epa-key-list-mode menu to easy-menu-define
* lisp/epa.el (epa-key-list-mode-map): Move menu from here...
(epa-key-list-mode-menu): ...to here, and convert to easy-menu-define.
Stefan Monnier [Thu, 25 Feb 2021 04:08:47 +0000 (23:08 -0500)]
Remove last remaining external uses of `edebug-form-spec`
* lisp/emacs-lisp/gv.el (gv-place): Use `def-edebug-elem-spec`.
* lisp/obsolete/erc-compat.el (erc-define-minor-mode): Remove redundant
`edebug-form-spec`.
Stefan Monnier [Wed, 24 Feb 2021 23:39:06 +0000 (18:39 -0500)]
* test/lisp/emacs-lisp/macroexp-tests.el (macroexp--tests-file-name): Add case
Add use of `macroexp-file-name` from a macro called from within
a function, which works thanks to eager-macroexpansion (so the macro
is expanded which the file is being loaded rather than only later
when the function is called).
* test/lisp/emacs-lisp/macroexp-resources/m1.el
(macroexp--m1-tests-file-name): New function.
Stefan Monnier [Wed, 24 Feb 2021 23:12:18 +0000 (18:12 -0500)]
* test/lisp/emacs-lisp/macroexp-tests.el (macroexp--tests-file-name): New test
* test/lisp/emacs-lisp/macroexp-resources/m1.el:
* test/lisp/emacs-lisp/macroexp-resources/m2.el: New files.
Lars Ingebrigtsen [Wed, 24 Feb 2021 22:55:05 +0000 (23:55 +0100)]
Include a "make check-maybe" in the admin/emake script
Basil L. Contovounesios [Wed, 24 Feb 2021 22:34:06 +0000 (22:34 +0000)]
; Fix recent obsoletion warning in cl.el.
Basil L. Contovounesios [Wed, 24 Feb 2021 22:20:10 +0000 (22:20 +0000)]
; Add :version tags to recent newsticker options.
Stefan Monnier [Wed, 24 Feb 2021 22:16:00 +0000 (17:16 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-file-name): Work in `eval-buffer`
Rely on `current-load-list` instead of `load-file-name`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Change the var we override accordingly.
Lars Ingebrigtsen [Wed, 24 Feb 2021 19:32:09 +0000 (20:32 +0100)]
Improve quail-update-leim-list-file error messaging
* lisp/international/quail.el (quail-update-leim-list-file): Give
a better error message.
Lars Ingebrigtsen [Wed, 24 Feb 2021 19:31:31 +0000 (20:31 +0100)]
Fix warning generated by indian.el + quail.el
* lisp/leim/quail/indian.el (quail-define-indian-trans-package):
Reintroduce kludge to fix automatic detection by Quail.
Juri Linkov [Wed, 24 Feb 2021 18:52:27 +0000 (20:52 +0200)]
* lisp/tab-bar.el: Move aliases down closer to keybindings.
Juri Linkov [Wed, 24 Feb 2021 18:51:04 +0000 (20:51 +0200)]
* lisp/tab-bar.el (tab-switch): New defalias to 'tab-bar-switch-to-tab'.
(tab-prefix-map): Bind "O" to 'tab-previous'.
Stefan Monnier [Wed, 24 Feb 2021 18:52:45 +0000 (13:52 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-file-name): New function.
Yes, finally: a function that tells you the name of the file where
the code is located. Finding this name is non-trivial in practice,
as evidenced by the "4 shift/reduce conflicts" warning when compiling
CEDET's python.el, because its `wisent-source` got it wrong in that
case, thinking the grammar came from `python.el` instead of
`python-wy.el`.
While at it, also made `macroexp-compiling-p` public, since it's
useful at various places.
(macroexp-compiling-p): Rename from `macroexp--compiling-p`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Bind `load-file-name` to nil so we can distinguish a load that calls
the byte compiler from a byte compilation which causes a load.
* lisp/cedet/semantic/wisent/python.el (wisent-python--expected-conflicts):
Remove; it was just a workaround.
* lisp/subr.el (do-after-load-evaluation): Avoid `byte-compile--` vars.
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete):
Use `macroexp-compiling-p` and `macroexp-file-name`.
* lisp/cedet/semantic/wisent/comp.el (wisent-source): Use `macroexp-file-name`
(wisent-total-conflicts): Tighten regexp.
* lisp/emacs-lisp/cl-lib.el (cl--compiling-file): Delete function
and variable. Use `macroexp-compiling-p` instead.
* lisp/progmodes/flymake.el (flymake-log):
* lisp/emacs-lisp/package.el (package-get-version):
* lisp/emacs-lisp/ert-x.el (ert-resource-directory):
Use `macroexp-file-name`.
Ulf Jasper [Wed, 24 Feb 2021 18:26:37 +0000 (19:26 +0100)]
Add options to use feed names from newticker-url-list
* lisp/net/newst-treeview.el
(newsticker-treeview-use-feed-name-from-url-list-in-treeview): New.
(newsticker-treeview-use-feed-name-from-url-list-in-itemview): New.
(newsticker--treeview-item-show): Show feed name from
newsticker-url-list if wanted.
(newsticker--treeview-propertize-tag): Add argument 'tooltip'.
(newsticker--treeview-tree-get-tag): Usefeed name from
newsticker-url-list if wanted. (Fixes third issue in
Bug#41376.)
Lars Ingebrigtsen [Wed, 24 Feb 2021 17:29:25 +0000 (18:29 +0100)]
Fix wisent/python.el grammar warning
* lisp/cedet/semantic/wisent/python.el: Fix warning about
shift/reduce conflicts in the Python grammar.
Lars Ingebrigtsen [Wed, 24 Feb 2021 17:13:03 +0000 (18:13 +0100)]
Fix warning generated by indian.el + quail.el
* lisp/leim/quail/indian.el (quail-define-indian-trans-package):
Reintroduce kludge to fix automatic detection by Quail.
Lars Ingebrigtsen [Wed, 24 Feb 2021 16:58:38 +0000 (17:58 +0100)]
Remove the "Documentation:" line from the variable help
* lisp/help-fns.el (describe-variable): Remove the
"Documentation:" line (bug#46702). This makes the help text more
compact and seems easier to read, too.
Lars Ingebrigtsen [Wed, 24 Feb 2021 16:53:53 +0000 (17:53 +0100)]
Fix Calc menu item for vector dot products
* lisp/calc/calc-menu.el (calc-vectors-menu): Use the correct
function `calc-times' instead of the non-existent `calc-mult'
function (bug#46710).
Doug Davis [Wed, 24 Feb 2021 16:43:49 +0000 (17:43 +0100)]
Interactive tag byte compilation functions in emacs-lisp-mode
* lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load): Add interactive tagging
(bug#46721).
Miha Rihtaršič [Wed, 24 Feb 2021 16:38:56 +0000 (17:38 +0100)]
Run all functions in `prefix-command-echo-keystrokes-functions'
* lisp/simple.el (internal-echo-keystrokes-prefix): Really run all
functions in `prefix-command-echo-keystrokes-functions' (bug#46727).
Copyright-paperwork-exempt: yes
Protesilaos Stavrou [Wed, 24 Feb 2021 16:18:26 +0000 (17:18 +0100)]
Use named faces in shortdoc
* shortdoc.el (shortdoc-heading): Define new face for headings.
(shortdoc-display-group): Apply new heading face.
(shortdoc--display-function): Use existing face for section text.
* etc/NEWS: Document new face (bug#46748).
Utkarsh Singh [Tue, 23 Feb 2021 15:41:14 +0000 (16:41 +0100)]
Use sh-mode for PKGBUILD files
* lisp/files.el (auto-mode-alist): Use sh-mode for PKGBUILD files
(bug#46660).
Copyright-paperwork-exempt: yes
Eli Zaretskii [Wed, 24 Feb 2021 15:55:28 +0000 (17:55 +0200)]
Fix dangerous code in xdisp.c
* src/xdisp.c (move_it_to, display_line): Make sure ZV_BYTE is
greater than 1 before fetching previous byte.
Eli Zaretskii [Wed, 24 Feb 2021 15:43:08 +0000 (17:43 +0200)]
Better support for 'truncate-line' non-nil in the mini-window
* src/xdisp.c (resize_mini_window): Resize the mini-window
when multi-line text is displayed under truncate-lines
non-nil in the minibuffer. (Bug#46718)
Protesilaos Stavrou [Wed, 24 Feb 2021 09:18:38 +0000 (11:18 +0200)]
Specify the Emacs version of new vc-dir faces
* vc-dir.el (vc-dir-header)
(vc-dir-header-value)
(vc-dir-directory)
(vc-dir-file)
(vc-dir-mark-indicator)
(vc-dir-status-warning)
(vc-dir-status-edited)
(vc-dir-status-up-to-date)
(vc-dir-status-ignored): Add version 28.1. (Bug#46745)
Juri Linkov [Tue, 23 Feb 2021 19:05:30 +0000 (21:05 +0200)]
Small fixes
* lisp/emacs-lisp/seq.el (seq-contains): Move the ‘declare’ form
after the docstring.
* lisp/misc.el (copy-from-above-command): Fix whitespace regexp.
Juri Linkov [Tue, 23 Feb 2021 19:01:31 +0000 (21:01 +0200)]
* lisp/tab-line.el (tab-line-tab-name-format-function): New defcustom.
(tab-line-tab-name-format-default): New function as the default value.
(tab-line-format-template): Funcall tab-line-tab-name-format-function.
This is like recently added tab-bar-tab-name-format-function.
Juri Linkov [Tue, 23 Feb 2021 18:57:31 +0000 (20:57 +0200)]
* lisp/tab-bar.el (tab-prefix-map): Bind "n" to 'tab-duplicate'.
(tab-bar-separator): New function.
(tab-bar-make-keymap-1): Use it.
Ulf Jasper [Tue, 23 Feb 2021 18:43:56 +0000 (19:43 +0100)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Ulf Jasper [Tue, 23 Feb 2021 18:31:32 +0000 (19:31 +0100)]
Leave other windows unchanged, use search instead of re-search
* lisp/net/newst-backend.el (newsticker-customize-feed): Leave other
windws unchanged. Use search instead of re-search.
Ulf Jasper [Tue, 23 Feb 2021 18:23:50 +0000 (19:23 +0100)]
Fix invalid interactive-statement
* lisp/net/newst-backend.el (newsticker-customize): Fix invalid
interactive-statement.
Stefan Monnier [Tue, 23 Feb 2021 17:14:59 +0000 (12:14 -0500)]
* test/: Use lexical-binding the few remaining files
* test/manual/biditest.el: Use lexical-binding.
(biditest-generate-testfile): Remove unused var `levels`.
* test/manual/image-circular-tests.el: Use lexical-binding.
* test/manual/image-size-tests.el: Use lexical-binding.
(image-size-tests): Check `fboundp` before calling `imagemagick-types`.
* test/manual/redisplay-testsuite.el: Use lexical-binding.
* test/manual/cedet/cedet-utests.el: Use lexical-binding.
Use `with-current-buffer`.
(cedet-utest): Test `fboundp` i.s.o `featurep` to silence warning.
(srecode-map-save-file): Declare var.
(pulse-test): Test `fboundp` before calling `pulse-available-p`.
Declare `pulse-momentary-highlight-overlay` since it's not autoloaded.
* test/manual/cedet/semantic-tests.el: Use lexical-binding.
Use `with-current-buffer`.
(semanticdb-ebrowse-dump): Remove unused var `ab`.
(semanticdb-test-gnu-global): Don't use obsolete "name" arg to constructor.
(cedet-utest-directory): Declare var.
Ulf Jasper [Tue, 23 Feb 2021 16:33:46 +0000 (17:33 +0100)]
Add command for customizing current newsticker feed
* lisp/net/newst-backend.el (newsticker-customize-feed): New.
(newsticker--insert-bytes): Add documentation string.
(newsticker--decode-iso8601-date): Fix documentation string.
* lisp/net/newst-treeview.el (newsticker-treeview-customize-current-feed):
New.
(newsticker-treeview-mode-map): Add key for new command
'newsticker-treeview-customize-current-feed'. (Fixes second issue in
Bug#41376.)
Michael Albinus [Tue, 23 Feb 2021 15:04:22 +0000 (16:04 +0100)]
; Fix tramp.texi typos
Robert Pluim [Tue, 23 Feb 2021 13:21:26 +0000 (14:21 +0100)]
* doc/misc/tramp.texi: Grammar/style fixes
* doc/misc/tramp.texi (Overview):
(Obtaining @value{tramp}):
(Quick Start Guide):
(Configuration):
(Connection types):
(Inline methods):
(External methods):
(Password handling):
(Predefined connection information):
(Remote shell setup):
(Remote processes):
(Frequently Asked Questions):
(External packages):
(Traces and Profiles): Grammar/style fixes.
Robert Pluim [Tue, 23 Feb 2021 13:07:32 +0000 (14:07 +0100)]
* lisp/net/dictionary-connection.el: Grammar fixes
* lisp/net/dictionary-connection.el: Grammar fix
(dictionary-connection-open): Use active voice.
(dictionary-connection-status): Reword and improve formatting.
Robert Pluim [Tue, 23 Feb 2021 12:47:49 +0000 (13:47 +0100)]
Make message-mailto work for emacsclient
* doc/misc/message.texi (System Mailer Setup): Add index entry.
Mention option to use emacsclient.
* etc/NEWS: Mention emacsclient option for 'mailto:' handling.
* etc/emacs-mail.desktop: Add example using emacsclient.
* lisp/gnus/message.el (message-mailto): Add optional url argument
so we can call it from emacsclient.
Alan Mackenzie [Tue, 23 Feb 2021 11:16:24 +0000 (11:16 +0000)]
CC Mode: Fix bug in "state cache" invalidation function.
* lisp/progmodes/cc-engine.el (c-invalidate-state-cache-1): Rewrite part of
it, following the code in c-parse-state-1, to get a proper setting of
c-state-cache-good-pos.
Stefan Kangas [Tue, 23 Feb 2021 02:51:12 +0000 (03:51 +0100)]
Convert some more menus to easy-menu-define
* lisp/tar-mode.el (tar-mode-map):
* lisp/textmodes/sgml-mode.el (sgml-mode-map, html-mode-map):
* lisp/wdired.el (wdired-mode-map): Move menus from here...
* lisp/tar-mode.el (tar-mode-immediate-menu, tar-mode-mark-menu)
* lisp/textmodes/sgml-mode.el (sgml-mode-menu, html-mode-menu):
* lisp/wdired.el (wdired-mode-menu): ...to here, and convert to
easy-menu-define.
Stefan Kangas [Tue, 23 Feb 2021 02:24:31 +0000 (03:24 +0100)]
Improve easymenu.el Commentary section
* lisp/emacs-lisp/easymenu.el: Improve Commentary section.
Stefan Monnier [Mon, 22 Feb 2021 22:38:58 +0000 (17:38 -0500)]
* lisp/progmodes/antlr-mode.el: Fix bootstrap failure
(antlr-mode): Remove compatibility code with older CC-mode.
This somehow appears to fix the error:
In antlr-mode:
progmodes/antlr-mode.el:2426:20: Error: `c-init-language-vars' defined
after use in (c-init-language-vars) (missing `require' of a library
file?)
progmodes/antlr-mode.el:2427:26: Warning: c-init-language-vars called
with 0 arguments, but requires 1
No idea what caused the error to appear after the previous patch either.
Lars Ingebrigtsen [Mon, 22 Feb 2021 22:30:04 +0000 (23:30 +0100)]
Do mode tagging in decipher.el
Lars Ingebrigtsen [Mon, 22 Feb 2021 22:27:53 +0000 (23:27 +0100)]
Do mode tagging in bubbles.el
Stefan Monnier [Mon, 22 Feb 2021 21:54:59 +0000 (16:54 -0500)]
* lisp/obsolete: Use lexical-binding
Use lexical-binding in all the lisp/obsolete/*.el files.
While at it, removed redundant :group arguments and used #' to quote
functions. Commented out the key bindings which the #' revealed
to lead to non-existing commands, and replaced those revealed to be obsolete.
* lisp/obsolete/cl-compat.el: Use cl-lib.
* lisp/obsolete/cust-print.el: Assume `defalias` exists.
(with-custom-print): Use `declare`.
* lisp/obsolete/iswitchb.el (iswitchb-init-XEmacs-trick)
(iswitchb-xemacs-backspacekey): Remove functions.
* lisp/obsolete/landmark.el (landmark, landmark-nslify-wts):
Prefer `apply` to `eval`.
* lisp/obsolete/longlines.el (longlines-mode): Don't use `add-to-list`
on a hook.
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): Use `clear-string`.
* lisp/obsolete/pgg-pgp.el (pgg-pgp-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp-verify-region): Declare var `jam-zcat-filename-list`.
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp5-verify-region): Declare var `jam-zcat-filename-list`.
* lisp/obsolete/pgg.el: Remove some XEmacs compatibility code.
(pgg-run-at-time, pgg-cancel-timer, pgg-clear-string): Remove functions.
Use their core equivalent instead.
* lisp/obsolete/rcompile.el (remote-compile): Remove unused vars `l`,
`l-host`, `l-user`, and `localname`.
* lisp/obsolete/starttls.el (starttls-any-program-available):
Use `define-obsolete-function-alias`.
* lisp/obsolete/tls.el (tls-format-message): Delete function, use
`format-message` instead.
* lisp/obsolete/url-ns.el (url-ns-prefs): Use `with-current-buffer`
and `dlet`.
* lisp/obsolete/vip.el (vip-escape-to-emacs): Remove unused var `key`.
(vip-command-argument, vip-read-string, ex-delete, ex-line): Remove
unused var `conditions`.
(ex-map): Use a closure instead of `eval`.
(ex-set): Make it an alias of `set-variable`.
(ex-substitute): Remove unused var `cont`.
* lisp/obsolete/abbrevlist.el:
* lisp/obsolete/bruce.el:
* lisp/obsolete/cc-compat.el:
* lisp/obsolete/cl-compat.el:
* lisp/obsolete/cl.el:
* lisp/obsolete/complete.el:
* lisp/obsolete/crisp.el:
* lisp/obsolete/cust-print.el:
* lisp/obsolete/erc-compat.el:
* lisp/obsolete/erc-hecomplete.el:
* lisp/obsolete/eudcb-ph.el:
* lisp/obsolete/fast-lock.el:
* lisp/obsolete/gs.el:
* lisp/obsolete/gulp.el:
* lisp/obsolete/html2text.el:
* lisp/obsolete/info-edit.el:
* lisp/obsolete/iswitchb.el:
* lisp/obsolete/landmark.el:
* lisp/obsolete/lazy-lock.el:
* lisp/obsolete/longlines.el:
* lisp/obsolete/mailpost.el:
* lisp/obsolete/mantemp.el:
* lisp/obsolete/meese.el:
* lisp/obsolete/messcompat.el:
* lisp/obsolete/metamail.el:
* lisp/obsolete/mouse-sel.el:
* lisp/obsolete/nnir.el:
* lisp/obsolete/old-emacs-lock.el:
* lisp/obsolete/otodo-mode.el:
* lisp/obsolete/patcomp.el:
* lisp/obsolete/pc-mode.el:
* lisp/obsolete/pc-select.el:
* lisp/obsolete/pgg-def.el:
* lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el:
* lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el:
* lisp/obsolete/pgg.el:
* lisp/obsolete/rcompile.el:
* lisp/obsolete/s-region.el:
* lisp/obsolete/sb-image.el:
* lisp/obsolete/sregex.el:
* lisp/obsolete/starttls.el:
* lisp/obsolete/sup-mouse.el:
* lisp/obsolete/terminal.el:
* lisp/obsolete/tls.el:
* lisp/obsolete/tpu-edt.el:
* lisp/obsolete/tpu-extras.el:
* lisp/obsolete/tpu-mapper.el:
* lisp/obsolete/url-ns.el:
* lisp/obsolete/vc-arch.el:
* lisp/obsolete/vi.el:
* lisp/obsolete/vip.el:
* lisp/obsolete/ws-mode.el:
* lisp/obsolete/yow.el: Use lexical-binding.
Lars Ingebrigtsen [Mon, 22 Feb 2021 21:39:27 +0000 (22:39 +0100)]
Mention the problems with newlines in Dired
* doc/emacs/dired.texi (Dired Enter): Mention newlines and what to
do about them.
* lisp/dired.el (dired-listing-switches): Mention newlines
(bug#46705).
Lars Ingebrigtsen [Mon, 22 Feb 2021 21:34:03 +0000 (22:34 +0100)]
Buttonize function values in help (and add a blank line)
* lisp/help-fns.el (describe-variable): Add a newline for better
readability (bug#46702). This also has the side effect of
buttonizing `function-references-like-this' in the "Its value is"
part.
* lisp/help-mode.el (help-make-xrefs): Adjust comments.
Basil L. Contovounesios [Mon, 22 Feb 2021 20:31:06 +0000 (20:31 +0000)]
; Fix last change in test-custom-libs.el.
Stefan Monnier [Mon, 22 Feb 2021 17:22:19 +0000 (12:22 -0500)]
* lisp/progmodes/antlr-mode.el: Remove XEmacs compatibility
(cond-emacs-xemacs, cond-emacs-xemacs-macfn, defunx, ignore-errors-x):
Remove those functions and macros. Replace every use with the result
of their use.
(antlr-default-directory): Remove function, use the `default-directory`
variable instead.
(antlr-read-shell-command): Remove function, use
`read-shell-command` instead.
(antlr-with-displaying-help-buffer): Remove function, by inlining it at
its only call site.
(antlr-end-of-rule, antlr-beginning-of-rule, antlr-end-of-body)
(antlr-beginning-of-body): Mark them as movement commands.
Juri Linkov [Mon, 22 Feb 2021 17:12:43 +0000 (19:12 +0200)]
* lisp/tab-bar.el: 'C-x t N' bound to tab-new-to supports a negative argument
* lisp/tab-bar.el (tab-bar-new-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-new-tab): Fix docstring to add reference to
'tab-bar-new-tab-to'.
(tab-prefix-map): Bind "N" to tab-new-to.
Juri Linkov [Mon, 22 Feb 2021 17:08:16 +0000 (19:08 +0200)]
* lisp/tab-bar.el: 'C-x t M' bound to tab-move-to supports a negative argument
* lisp/tab-bar.el (tab-bar-move-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-move-tab): Fix docstring to add reference to tab-bar-move-tab-to.
(tab-prefix-map): Bind "M" to tab-move-to.
Juri Linkov [Mon, 22 Feb 2021 17:03:42 +0000 (19:03 +0200)]
'Mod-9' bound to 'tab-last' now switches to the last tab like in web browsers
* lisp/tab-bar.el (tab-bar--define-keys): Rebind 0 from
tab-bar-switch-to-recent-tab to its alias tab-recent.
Bind 9 to tab-last.
(tab-bar-switch-to-last-tab): New command.
(tab-last): New alias to tab-bar-switch-to-last-tab.
(tab-bar-switch-to-tab, tab-bar-undo-close-tab): Fix docstrings to
avoid mentioning the term "last" for "most recently used" meaning.
Juri Linkov [Mon, 22 Feb 2021 16:56:47 +0000 (18:56 +0200)]
* lisp/tab-bar.el (tab-bar--undefine-keys): New function from tab-bar-mode.
Stefan Monnier [Mon, 22 Feb 2021 16:54:17 +0000 (11:54 -0500)]
Prefer `declare` over a `put` of `list-indent-function`.
While at it, I enabled lexical-binding in the affected files.
* lisp/cedet/semantic/sb.el: Enable lexical-binding.
(semantic-sb-with-tag-buffer): Use `declare`.
* lisp/cedet/semantic/bovine/el.el: Enable lexical-binding.
(semantic-elisp-setup-form-parser): Use `declare`.
* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/ert-x.el: Remove redundant `put`.
* lisp/emulation/cua-rect.el: Enable lexical-binding.
(cua--rectangle-operation, cua--rectangle-aux-replace): Use `declare`.
* lisp/mh-e/mh-acros.el: Enable lexical-binding.
(mh-do-in-gnu-emacs, mh-do-in-xemacs, mh-funcall-if-exists, defun-mh)
(defmacro-mh, with-mh-folder-updating, mh-in-show-buffer)
(mh-do-at-event-location, mh-iterate-on-messages-in-region)
(mh-iterate-on-range): Use `declare`.
* lisp/mh-e/mh-compat.el: Enable lexical-binding.
(mh-flet): Use `declare`.
* lisp/mh-e/mh-e.el: Enable lexical-binding.
(defgroup-mh, defcustom-mh,
defface-mh): Use `declare`.
* lisp/net/sieve.el: Enable lexical-binding. Remove redundant :group args.
(sieve-activate, sieve-remove, sieve-edit-script): Remove unused arg
from the interactive spec.
(sieve-deactivate-all): Remove unused var `name`.
(sieve-change-region): Use `declare`.
* lisp/obsolete/fast-lock.el: Enable lexical-binding.
Remove redundant :group args. Remove XEmacs compat code.
(save-buffer-state): Remove macro.
(fast-lock-add-properties): Use `with-silent-modifications` instead.
* lisp/obsolete/lazy-lock.el: Enable lexical-binding.
Remove redundant :group args.
(do-while): Use `declare`.
(save-buffer-state): Remove macro.
(lazy-lock-fontify-rest-after-change, lazy-lock-defer-line-after-change)
(lazy-lock-defer-rest-after-change, lazy-lock-after-fontify-buffer)
(lazy-lock-after-unfontify-buffer, lazy-lock-fontify-region):
Use `with-silent-modifications` instead.
* lisp/obsolete/pgg.el: Enable lexical-binding. Remove XEmacs compat code.
(pgg-save-coding-system, pgg-as-lbt, pgg-process-when-success):
Use `declare`.
(pgg-add-passphrase-to-cache): Remove unused var `new-timer`.
(pgg-decrypt-region): Remove unused var `buf`.
* lisp/org/org-agenda.el (org-let, org-let2): Move from org-macs and
use `declare`.
* lisp/org/org-macs.el (org-let, org-let2): Move these functions that
are inherently harmful to your karma to the only package that uses them.
(org-scroll): Use `pcase` to avoid `eval` and use more readable syntax
for those integers standing for events.
* lisp/progmodes/antlr-mode.el: Enable lexical-binding.
(save-buffer-state-x): Use `declare` and `with-silent-modifications`.
* lisp/international/mule-util.el (with-coding-priority):
* lisp/cedet/ede/proj-comp.el (proj-comp-insert-variable-once):
* lisp/org/org-element.el (org-element-map):
* test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load):
* test/lisp/emacs-lisp/generator-tests.el (cps-testcase): Use `declare`.